package com.xiaochun.hxhj;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.myview.PaletteView;
import com.util.MyLog;

public class DrawimgActivity extends BaseActivity implements View.OnClickListener {

    private TextView tv_save1;
    private PaletteView img_draw3;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    }

    @Override
    protected void initListener() {
        tv_save1.setOnClickListener(this);
    }

    @Override
    protected int initLayout() {
        return R.layout.activity_drawimg;
    }

    @Override
    protected void initView() {
        changeTitle("王冰寒");
//        saveNoticeList("name","王冰寒");
        String name = getVoiceList("name");
        tv_save1 = findViewById(R.id.tv_saveaaa);
        img_draw3 = findViewById(R.id.img_draw3);

        /*支持撤销（undo）；
        支持反撤销（redo）；
        支持橡皮擦（eraser）；
        支持清除功能（clear）；
        支持保存为图像（save）。*/

    }


    @Override
    protected void initData() {

    }

    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.tv_saveaaa:
                MyLog.e("保存图片","保存图片");
                img_draw3.saveImg(img_draw3.buildBitmap());
                break;
        }
    }
}
